<div class="layui-tab-item layui-show">
    <form id="curd_form" class="layui-form layuimini-form layui-form-pane">
        <input type="hidden" name="type" value="crud">
        <input type="hidden" name="numbers" value="0">
        <input type="hidden" name="cmd" value="0">
        <div class="layui-form-item" id="show-model">
            <input type="checkbox" name="set_model[relation]" lay-skin="primary" title="关联模型" lay-filter="showmodel">
            <input type="checkbox" name="set_model[global]" lay-skin="primary" title="全局模型类">
            <input type="checkbox" name="set_model[delete]" lay-skin="primary" title="删除模式">
            <input type="checkbox" name="set_model[force]" lay-skin="primary" title="强制覆盖模式">
        </div>
        <div class="layui-form-item">
            <h4>主表设置</h4>
            <hr>
        </div>
        <div id="main-content">
            <div class="layui-inline">
                <div class="layui-input-inline short">
                    <h6>请选择主表</h6>
                    <select name="mtable" lay-verify="required" lay-search="" lay-filter="main-table" class="layui-select main-table">
                        {volist name='tables' id='vo'}
                        <option value="{$vo}">{$vo}</option>
                        {/volist}
                    </select>
                </div>
                <div class="layui-input-inline short">
                    <h6>自定义控制器名</h6>
                    <input type="text" name="controller" autocomplete="off" class="layui-input" placeholder="支持目录层级,以/分隔">
                </div>
                <div class="layui-input-inline short">
                    <h6>自定义模型名</h6>
                    <input type="text" name="model" autocomplete="off" class="layui-input" placeholder="不支持目录层级">
                </div>
                <div class="layui-input-inline short fields-div">
                    <div class="layui-form-item">
                        <h6>请选择忽略字段(默认全部)</h6>
                    </div>
                    <input type="hidden" name="mfields">
                    <div class="layui-input-inline demo xm-select-data field-data"></div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
        </div>
        <div id="table-set">
            <!-- 关联模型 -->
            <div class="layui-form-item">
                <h4>关联表设置</h4>
                <hr>
            </div>
            <div id="add-temptl">
                <!-- 动态div -->
            </div>
            <div class="layui-form-item">
                <button id="add-content" type="button" class="layui-btn chang-color">追加关联模型</button>
            </div>
        </div>
        <div class="layui-form-item">
        </div>
        <!-- 字段识别设置 (与之匹配的字段都将生成相应组件) -->
        <div class="layui-form-item">
            <h4>字段识别设置<span>(与之匹配的字段都将生成相应组件)</span></h4>
            <hr>
        </div>
        <div id="main-content-field">
            <div class="layui-inline">
                <div class="layui-input-inline short">
                    <h6>复选框后缀</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为checkbox">
                </div>
                <div class="layui-input-inline short">
                    <h6>单选框后缀</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为radio">
                </div>
                <div class="layui-input-inline short">
                    <h6>图片类型后缀(单)</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为image,logo,photo,icon">
                </div>
                <div class="layui-input-inline short">
                    <h6>图片类型后缀(多)</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为images,photos,icons">
                </div>
                <div class="layui-input-inline short">
                    <h6>文件类型后缀</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为file,files">
                </div>
                <div class="layui-input-inline short">
                    <h6>日期时间后缀</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为date">
                </div>
                <div class="layui-input-inline short">
                    <h6>开关后缀</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为status">
                </div>
                <div class="layui-input-inline short">
                    <h6>动态下拉后缀(单)</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为select">
                </div>
                <div class="layui-input-inline short">
                    <h6>忽略的字段</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为update_time,delete_time">
                </div>
                <div class="layui-input-inline short">
                    <h6>排序字段</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为sort">
                </div>
                <div class="layui-input-inline short">
                    <h6>富文本编辑器</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为describe, content, details">
                </div>
                <div class="layui-input-inline short">
                    <h6>价格字段</h6>
                    <input type="text" name="number" autocomplete="off" class="layui-input" placeholder="默认为price">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
        </div>
        <!-- 生成命令行-->
        <div class="layui-form-item">
            <h4>生成命令行</h4>
            <hr>
        </div>
        <div class="layui-input-inline">
            <input type="text" name="create_cmd" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
        </div>
        <!-- 返回结果-->
        <div class="layui-form-item">
            <h4>返回结果</h4>
            <hr>
        </div>
        <div class="layui-input-inline">
            <textarea id="res_msg" name="content" rows="10" class="layui-textarea" placeholder="请输入返回结果"></textarea>
        </div>
        <div class="layui-form-item">
        </div>
        <div class="layui-form-item text-left">
            <div class="layui-btn layui-btn-normal layui-btn-sm" id='create_cmd'>生成命令行</div>
            <div class="layui-btn layui-btn-sm" id='create'>立即执行</div>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>
    </form>
</div>
<div id="tpl" style="display: none;">
    <div class="main-content">
        <div class="layui-inline">
            <div class="layui-input-inline short">
                <h6>请选择关联表</h6>
                <select name="otable[]" lay-verify="required" lay-search="" lay-filter="main-table" class="layui-select other-table">
                    {volist name='tables' id='vo'}
                    <option value="{$vo}">{$vo}</option>
                    {/volist}
                </select>
            </div>
            <div class="layui-input-inline short">
                <h6>请选择关联类型</h6>
                <select name="otype[]" lay-verify="required" lay-search="" lay-filter="other-type" class="layui-select other-type">
                    <option value="belongsto">belongsto</option>
                    <option value="hasone">hasone</option>
                </select>
            </div>
            <div class="layui-input-inline short other-key">
                <h6>关联外键</h6>
                <select name="okey[]" lay-verify="required" lay-search="" lay-filter="" class="layui-select">
                </select>
            </div>
            <div class="layui-input-inline short main-key">
                <h6>关联主键</h6>
                <select name="mkey[]" lay-verify="required" lay-search="" lay-filter="" class="layui-select">
                </select>
            </div>
            <div class="layui-input-inline short fields-div">
                <div class="layui-form-item">
                    <h6>请选择显示字段(默认全部)</h6>
                </div>
                <input type="hidden" name="ofields[]">
                <div class="layui-input-inline demo xm-select-data field-data"></div>
            </div>
            <div class="layui-input-inline short">
                <button type="button" class="layui-btn chang-color layui-btn-danger del-btn">移除</button>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
    </div>
</div>